/**
 * index.js
 * PLM项目统一配置入口文件
 * 微信小程序不支持动态require，所有模块引用必须使用静态字符串
 */

// 导入配置模块
const pathResolver = require('./path_resolver.js');
const moduleConfig = require('./module_config.js');
const serviceConfig = require('./services_config.js');
const storeConfig = require('./store_config.js');
const bizConfig = require('./biz_config.js');
const componentsConfig = require('./components_config.js');
const constantsConfig = require('./constants_config.js');
const routesConfig = require('./routes_config.js');
const mockDataConfig = require('./mock_data_config.js');
const pathImport = require('./path_import.js');
const modelsConfig = require('./models_config.js');
const libsConfig = require('./libs_config.js');
const projectLibsConfig = require('./project_libs_config.js');
const mobxConfig = require('./mobx_config.js');

// 导入研发相关配置
const researchPhaseConfig = require('./research_phase_config.js');
const researchRoleConfig = require('./research_role_config.js');
const researchStateMachine = require('./research_state_machine.js');
const researchState = require('./research_state.js');
const researchTransition = require('./research_transition.js');
const researchPermission = require('./research_permission.js');
const researchDocument = require('./research_document.js');
const passportBizConfig = require('./passport_biz_config.js');
const simpleHelpersConfig = require('./simple_helpers_config.js');
const projectHelpersConfig = require('./project_helpers_config.js');

// 统一导出所有配置
module.exports = {
  // 路径相关
  pathResolver,
  pathImport,
  
  // 核心配置
  moduleConfig,
  serviceConfig,
  storeConfig,
  bizConfig,
  componentsConfig,
  constantsConfig,
  routesConfig,
  mockDataConfig,
  
  // 模型与库
  modelsConfig,
  libsConfig,
  projectLibsConfig,
  mobxConfig,
  
  // 研发相关配置
  researchPhaseConfig,
  researchRoleConfig,
  researchStateMachine,
  researchState,
  researchTransition,
  researchPermission,
  researchDocument,
  passportBizConfig,
  
  // 辅助配置
  simpleHelpersConfig,
  projectHelpersConfig,
  
  // 直接导出核心模块，方便使用
  helpers: moduleConfig,
  services: serviceConfig,
  stores: storeConfig.stores,
  constants: constantsConfig,
  
  // 辅助函数
  getHelper: function(name) {
    return moduleConfig[name] || null;
  },
  
  getService: function(name) {
    return serviceConfig[name] || null;
  },
  
  getStore: function(name) {
    return storeConfig.stores[name] || null;
  },
  
  getBiz: function(name) {
    return bizConfig[name] || null;
  },
  
  getComponent: function(name) {
    return componentsConfig[name] || null;
  },
  
  // 导出公共工具函数
  getGlobalHelpers: pathImport.getGlobalHelpers
}; 